#coding=utf-8
import turtle
from turtle import *
import tkSimpleDialog

# sides = eval(input("Enter a number of sides between 2 and 6: "))
# https://stackoverflow.com/a/17210073/6132577
sides = int(raw_input("Enter a number of sides between 2 and 6: "))

colors = ['red', 'purple', 'blue', 'green', 'yellow', 'orange' ]

speed(0)
# your_name = turtle.textinput("Enter your name", "What is your name?")
# https://stackoverflow.com/a/41675329/6132577

your_name = tkSimpleDialog.askstring("Enter your name", "What is your name?")
t = turtle.Pen()
turtle.bgcolor('black')

for x in range(180):
	t.pencolor(colors[x%sides])
	t.penup() #离开
	t.forward(x*3/sides +x)
	t.write(your_name, font=("Arial", int((x+4)/4), "bold" ))
	t.pendown() #放下
	t.left(360/sides +1)


turtle.done()
